(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/public/login" ], {
    "05b3": function(e, t, n) {
        n.d(t, "b", function() {
            return o;
        }), n.d(t, "c", function() {
            return r;
        }), n.d(t, "a", function() {});
        var o = function() {
            this.$createElement;
            this._self._c;
        }, r = [];
    },
    "6d93": function(e, t, n) {
        var o = n("a14c");
        n.n(o).a;
    },
    9039: function(e, t, o) {
        (function(e) {
            o("767a"), n(o("66fd"));
            var t = n(o("9fd1"));
            function n(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = o, e(t.default);
        }).call(this, o("543d").createPage);
    },
    "9fd1": function(e, t, n) {
        n.r(t);
        var o, r = n("05b3"), u = n("a143");
        for (o in u) "default" !== o && function(e) {
            n.d(t, e, function() {
                return u[e];
            });
        }(o);
        n("6d93");
        var a = n("f0c5"), r = Object(a.a)(u.default, r.b, r.c, !1, null, null, null, !1, r.a, void 0);
        t.default = r.exports;
    },
    a143: function(e, t, n) {
        n.r(t);
        var o, r = n("b0a2"), u = n.n(r);
        for (o in r) "default" !== o && function(e) {
            n.d(t, e, function() {
                return r[e];
            });
        }(o);
        t.default = u.a;
    },
    a14c: function(e, t, n) {},
    b0a2: function(e, f, d) {
        (function(e) {
            Object.defineProperty(f, "__esModule", {
                value: !0
            }), f.default = void 0;
            var r = n(d("a34a")), u = n(d("e380")), t = d("26cb"), a = n(d("f0cd"));
            function n(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            function i(e, t, n, o, r, u, a) {
                try {
                    var c = e[u](a), i = c.value;
                } catch (e) {
                    return n(e), 0;
                }
                c.done ? t(i) : Promise.resolve(i).then(o, r);
            }
            function c(c) {
                return function() {
                    var e = this, a = arguments;
                    return new Promise(function(t, n) {
                        var o = c.apply(e, a);
                        function r(e) {
                            i(o, t, n, r, u, "next", e);
                        }
                        function u(e) {
                            i(o, t, n, r, u, "throw", e);
                        }
                        r(void 0);
                    });
                };
            }
            function s(t, e) {
                var n, o = Object.keys(t);
                return Object.getOwnPropertySymbols && (n = Object.getOwnPropertySymbols(t), e && (n = n.filter(function(e) {
                    return Object.getOwnPropertyDescriptor(t, e).enumerable;
                })), o.push.apply(o, n)), o;
            }
            function o(o) {
                for (var e = 1; e < arguments.length; e++) {
                    var r = null != arguments[e] ? arguments[e] : {};
                    e % 2 ? s(Object(r), !0).forEach(function(e) {
                        var t, n;
                        t = o, e = r[n = e], n in t ? Object.defineProperty(t, n, {
                            value: e,
                            enumerable: !0,
                            configurable: !0,
                            writable: !0
                        }) : t[n] = e;
                    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(r)) : s(Object(r)).forEach(function(e) {
                        Object.defineProperty(o, e, Object.getOwnPropertyDescriptor(r, e));
                    });
                }
                return o;
            }
            t = {
                data: function() {
                    return {
                        code: {
                            text: "获取验证码",
                            status: !1,
                            value: ""
                        },
                        loginWay: 0,
                        userPhone: "",
                        userPassword: "",
                        sysInfo: e.getStorageSync("sysInfo")
                    };
                },
                computed: o({}, (0, t.mapState)({
                    initData: function(e) {
                        return e.init.initData;
                    },
                    basicSet: function(e) {
                        return e.init.basicSet;
                    }
                })),
                onLoad: function() {
                    this.$Route.query.token && this.setTokenAndBack(this.$Route.query.token);
                },
                onShow: function() {},
                methods: o(o({}, (0, t.mapActions)([ "getUserInfo", "setTokenAndBack" ])), {}, {
                    getuserinfo: function(n) {
                        var o = this;
                        return c(r.default.mark(function e() {
                            var t;
                            return r.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    return t = new u.default(), e.next = 3, t.wxMiniProgramLogin(n);

                                  case 3:
                                    t = e.sent, a.default.commit("FORCE_OAUTH", !1), o.setTokenAndBack(t);

                                  case 6:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        }))();
                    },
                    wxLogin: function() {
                        var n = this;
                        return c(r.default.mark(function e() {
                            var t;
                            return r.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    return t = new u.default(), e.next = 3, t.login();

                                  case 3:
                                    void 0 !== (t = e.sent) && n.setTokenAndBack(t);

                                  case 5:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        }))();
                    },
                    onLoginWay: function(e) {
                        this.loginWay = e;
                    },
                    toLogin: function() {
                        var t = this;
                        0 === t.loginWay && t.$api("user.mobileLogin", {
                            mobile: t.userPhone,
                            code: t.code.value
                        }).then(function(e) {
                            1 === e.code && t.setTokenAndBack(e.data.userinfo.token);
                        }), 1 === t.loginWay && t.$api("user.accountLogin", {
                            account: t.userPhone,
                            password: t.userPassword
                        }).then(function(e) {
                            1 === e.code && t.setTokenAndBack(e.data.userinfo.token);
                        });
                    },
                    getCode: function() {
                        var t = this;
                        return c(r.default.mark(function e() {
                            var n, o;
                            return r.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    (n = t).code.status = !0, o = 60, n.$api("sms.send", {
                                        mobile: n.userPhone,
                                        event: "mobilelogin"
                                    }).then(function(e) {
                                        var t;
                                        1 === e.code ? (n.code.text = o + "秒", n.code.status = !0, t = setInterval(function() {
                                            0 < o ? (n.code.text = o - 1 + "秒", o--) : (clearInterval(t), n.code.text = "获取验证码", 
                                            n.code.status = !1);
                                        }, 1e3)) : n.code.status = !1;
                                    });

                                  case 4:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        }))();
                    },
                    jump: function(e, t) {
                        this.$Router.push({
                            path: e,
                            query: t
                        });
                    }
                })
            };
            f.default = t;
        }).call(this, d("543d").default);
    }
}, [ [ "9039", "common/runtime", "common/vendor" ] ] ]);